Remove last dependency on pin-project #629
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup to / depends on #603.
Was controversial and thus split out into its own PR (see #603 (comment) and following comments). The reason this can't be done using
pin-project-lite
is now documented as a code comment.With a breaking-change coming up soon-ish, I think another alternative would be to replace this type with the one from the
either
crate and have them provideEitherProj
plus the necessary unsafe code That would imply moving theLayer
andService
implementations forEither
out totower-service
&tower-layer
but I think that should be fine. It would also imply a bunch of extra impls onEither
that may or may not be nice to have, as well as an extra API change sinceeither::Either
hasLeft
andRight
variants rather thanA
andB
.cc @olix0r @davidpdrsn